<!--{include header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="settings">
	<div class="dashboard" id="dashboard">
		<ul>${current_account('/configuracoes')}</ul>
	</div>
    <div id="content" class="clear settings-box">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head"><h2>Configurações da sua conta</h2></div>
                <div class="sect">
                    <form id="settings-form" method="post" action="/configuracoes" enctype="multipart/form-data" class="validator">
						<div class="wholetip clear"><h3>1.Configurações básica</h3></div>
                        <div class="field email">
                            <label>E-mail</label>
                            <input type="text" size="30" name="email" id="settings-email-address" class="f-input {$readonly['email']}" {$readonly['email']} value="{$login_user['email']}" />
                        </div>
                        <div class="field">
                            <label>Imagem</label>
							<!--{if $login_user['avatar']}-->
							<img src="${user_image($login_user['avatar'])}" style="float:left;margin-top:-10px;margin-right:10px;"/>
							<!--{/if}-->
                            <input type="file" size="30" name="upload_image" id="settings-avatar" class="f-input" />
                            <span class="hint">Máx  imagem com até 512KB </span>
                        </div>
                        <div class="field username">
                            <label>Apelido</label>
                            <input type="text" size="30" name="username" id="settings-username" class="f-input {$readonly['username']}" value="{$login_user['username']}" require="true" datatype="limit" min="2" max="16" maxLength="16" {$readonly['username']} />
                        </div>
                        <div class="field password">
                            <label>Trocar senha</label>
                            <input type="password" size="30" name="password" id="settings-password" class="f-input" />
                            <span class="hint">Se  não quiser trocar a senha, basta deixar em branco.</span>
                        </div>
                        <div class="field password">
                            <label>Confirmar senha</label>&nbsp;&nbsp;
                            <input type="password" size="30" name="password2" id="settings-password-confirm" class="f-input" />
                        </div>
                        <div class="field password">
                            <label>Sexo</label>
							<select name="gender" class="f-city">${Utility::Option($option_gender, $login_user['gender'])}</select>
                        </div>
						<div class="wholetip clear"><h3>2.Contato</h3></div>
                        <div class="field mobile">
                            <label>Tel.Celular</label>
                            <input type="text" size="30" name="mobile" id="settings-mobile" class="number" value="{$login_user['mobile']}" datatype="mobile|ajax" url="{$WEB_ROOT}/ajax/validator.php" vname="signupmobile"  msg="Incorrect mobile number|The number has been registered" /><span class="inputtip">Numero de celular é importante, insira corretamente.</span>
                        </div>
                        <div class="field password">
                            <label>QQ</label>
                            <input type="text" size="30" name="qq" id="settings-qq" class="number" value="{$login_user['qq']}" />
                        </div>
						<div class="field city">
                            <label>Sua cidade</label>
							<select name="city_id" class="f-city">${Utility::Option(Utility::OptionArray($allcities, 'id', 'name'), $login_user['city_id'])}<option value='0'>Outras</option></select>
                        </div>
						<div class="wholetip clear">
						  <h3>3.Correspondência</h3></div>
                        <div class="field username">
                            <label>Nome</label>
                            <input type="text" size="30" name="realname" id="settings-realname" class="f-input" value="{$login_user['realname']}" />
							<span class="hint">Nome que deve conincidir com seu nome deu usuário (ID).</span>
                        </div>
                        <div class="field username">
                            <label>Endereço</label>
                            <input type="text" size="30" name="address" id="settings-address" class="f-input" value="{$login_user['address']}" />
                            <span class="hint">Para produtos comprados que necessitem de entrega. </span>
                        </div>
						                        <div class="field">
                            <label>CEP</label>
                            <input type="text" maxLength=8 size="10" name="zipcode" id="settings-zipcode" class="f-input number" value="{$login_user['zipcode']}" />
                        </div>
                        <div class="clear"></div>
                        <div class="act">
                            <input type="submit" value="Editar" name="commit" id="settings-submit" class="formbutton"/>
                        </div>
                    </form>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
    <div id="sidebar" class="rail">
		<!--{include block_side_credit}-->
		<!--{include block_side_credittip}-->
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
